# 作者: 宇
# 2025年02月21日21时00分16秒

class Dog:
    def __init__(self,name):
        self.name=name

    def game(self):
        print("%s 蹦蹦跳跳的玩耍"%self.name)

class xiaotianDog(Dog):
    def game(self):
        print("%s 飞到天上去玩耍"%self.name)

class Person:
    def __init__(self,name):
        self.name=name

    def game_with_dog(self,dog:Dog):
        print("%s 和 %s 快乐的玩耍"%(self.name,dog.name))
        dog.game()

if __name__ == '__main__':
    wangcai=Dog('旺财')
    xiaotianquan=xiaotianDog('哮天犬')
    xiaoming=Person('小明')
    xiaoming.game_with_dog(wangcai)
    print('--'*50)
    xiaoming.game_with_dog(xiaotianquan)